package com.yeskery.nut.web.demo.service.impl;

import com.yeskery.nut.annotation.bean.Service;
import com.yeskery.nut.extend.mybatisplus.ServiceImpl;
import com.yeskery.nut.web.demo.domain.Wallet;
import com.yeskery.nut.web.demo.mapper.WalletMapper;
import com.yeskery.nut.web.demo.service.WalletService;

/**
 * 用户service实现类
 * @author Yeskery
 * 2023/7/28
 */
@Service
public class WalletServiceImpl extends ServiceImpl<WalletMapper, Wallet> implements WalletService {
    @Override
    public boolean deductPoint(Integer userId, Integer point) {
        return getBaseMapper().deductPoint(userId, point) > 0;
    }
}
